import useUserStore from "../stores/system/user";

export function getPermissions(): string[] {
    return useUserStore().permissions;
}

export function checkPermissions(permissions: string[]): boolean{
    for (let index in permissions){
        const permission = permissions[index];
        if(getPermissions().includes(permission)){
            return true;
        }
    }
    return false;
}